cmake_minimum_required(VERSION 3.10)

# 设置项目名称
project(AXPY_OPTIM)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=rv64gcv0p7 -mabi=lp64d")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=rv64gcv0p7 -mabi=lp64d")

set(CMAKE_C_COMPILER "/home/helen/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1/bin/riscv64-unknown-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "/home/helen/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1/bin/riscv64-unknown-linux-gnu-g++")

# 添加头文件路径
include_directories(
    ${PROJECT_SOURCE_DIR}/include
)
include_directories(
    "/home/helen/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1/riscv64-unknown-linux-gnu/include"
)

# 添加源代码文件路径
aux_source_directory(${PROJECT_SOURCE_DIR}/src DIR_SRCS)

# 指定生成目标 
add_executable(AXPY_RVV ${DIR_SRCS})